home *** CD-ROM | disk | FTP | other *** search
- #include "bbs.h"
-
- extern int ChatFlag;
-
- int Check_Online_Status(void)
- {
- int stat;
-
- if(Whence_The_Logon==AWAIT_LOGON) return(SUCCESS);
- if(Whence_The_Logon==GOODBYE_LOGON) return(NO_CARRIER);
- if(Whence_The_Logon==REMOTE_LOGON) {
- stat=CheckCarrier();
- if(stat==FALSE) return(NO_CARRIER);
- }
-
- Time_system=time(NULL);
-
- if(Time_holder==0L)
- Time_holder=Time_system;
-
- if(ChatFlag!=1) {
- User.Time_Used += Time_system-Time_holder;
- Time_limit -= Time_system-Time_holder;
- }
-
- Time_holder=Time_system;
-
- if((Time_limit<=0L)&&(ChatFlag!=1)) {
- AEPutStr("\r\nYou have exceeded your time limit\r\n");
- AEPutStr("Goodbye\r\n\r\n");
- AEPutStr("Disconnecting..");
- Whence_The_Logon=GOODBYE_LOGON;
- DropDTR();
- return(NO_CARRIER);
- }
-
- return(SUCCESS);
- }
-